<extend name="Base/list" />

<block name="title">导出的数据</block>
<block name="head"><script type="text/javascript" src="__JS__/{$Think.const.CONTROLLER_NAME}.js"></script></block>

<block name="nav">
<li class="current"><a href="{:U(CONTROLLER_NAME.'/index')}">列表</a></li>
</block>

<block name="search"></block>

<block name="list">
<if condition="$All">
<div id="list">
  <form method="post" action="{:U(CONTROLLER_NAME.'/zip')}">
    <table>
      <tr><th class="zip">打包</th><th class="name">文件名</th><th class="size">文件大小</th><th class="control">操作</th></tr>
      <foreach name="All" key="key" item="value">
      <foreach name="value" key="k1" item="v1">
      <tr><th class="title" colspan="4">{$k1}</th></tr>
      <foreach name="v1" key="k2" item="v2">
      <tr><td><if condition="$key!='zip'"><input type="checkbox" name="files[]" value="{$v2['name']}" class="files"><else/>-</if></td><td>{$v2['name']}</td><td>{$v2['size']}</td><td><a href="{:C('WEB_URL')}{:C('OUTPUT_DIR')}{$v2['name']}">下载</a>/<a href="{:U(CONTROLLER_NAME.'/delete',array('id'=>$v2['name']))}">删除</a></td></tr>
      </foreach>
      </foreach>
      </foreach>
      <tr class="footer"><td><label><input type="checkbox" class="all">全选</label></td><td colspan="3"><label><input type="checkbox" name="del" checked>打包完成后删除源文件</label> <input type="submit" value="立即打包" class="btn btn-primary radius"></td></tr>
    </table>
  </form>
</div>
<else/>
<p id="nothing">暂无数据文件</p>
</if>
</block>